package cn.rkylin.oms.warehouse.stockin.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;

import cn.rkylin.oms.warehouse.stockin.vo.StockInGoodsVO;
import cn.rkylin.oms.warehouse.stockin.vo.StockInVO;

/**
 * 入库Service
 * 
 * @author 齐涛
 * @version 1.0
 * @created 11-9-2017 10:51:30
 */
public interface IStockInService {

    /**
     * 查询入库单列表
     * 
     * @param page
     *            页号
     * @param rows
     *            页大小
     * @param stockInVO
     *            入库单VO
     * @return 入库单列表
     * @throws Exception
     *             异常
     */
    @SuppressWarnings("rawtypes")
    public PageInfo findByWhere(int page, int rows, StockInVO stockInVO) throws Exception;
    
    /**
     * 查询入库单商品列表
     * 
     * @param stockInGoodsVO
     *            入库单商品VO
     * @throws Exception
     *             异常
     */
    public List<StockInGoodsVO> selectStockInGoodsList(StockInGoodsVO stockInGoodsVO) throws Exception;

    /**
     * 查询入库单信息
     * 
     * @param stockInVO
     *            入库单VO
     * @return 入库单信息
     * @throws Exception
     *             异常
     */
    public StockInVO getStockInInfo(StockInVO stockInVO) throws Exception;

    /**
     * 审核入库单状态
     * 
     * @param stockinId
     *            入库单Id
     * @throws Exception
     *             异常
     */
    public void saveAuditStockIn(String stockinId) throws Exception;

    /**
     * 删除入库单
     * 
     * @param stockinId
     *            入库单Id
     * @param stockInStatus
     *            入库单状态
     * @throws Exception
     *             异常
     */
    public void deleteStockIn(String stockinId, String stockInStatus) throws Exception;

    /**
     * 添加入库单
     * 
     * @param stockInVO
     *            入库单VO
     * @return 插入入库单条数
     * @throws Exception
     *             异常
     */
    public int insertStockIn(StockInVO stockInVO) throws Exception;
    
    /**
     * 修改入库单(备注)
     * 
     * @param stockInVO
     *            入库单VO
     * @return 修改入库单备注条数
     * @throws Exception
     *             异常
     */
    public int updateStockInRemark(StockInVO stockInVO) throws Exception;

    /**
     * 修改入库单
     * 
     * @param stockInVO
     *            入库单VO
     * @return 修改入库单条数
     * @throws Exception
     *             异常
     */
    public int updateStockIn(StockInVO stockInVO) throws Exception;

    /**
     * getUnGoingCount:获取进行中的单据数量. <br/>
     *
     * @author zhanghao
     * @param paramMap
     * @return
     * @throws Exception
     */
    public int getUnGoingCount(Map<String, String> paramMap) throws Exception;

}
